package com.tmpt.dto;

import com.inspiresoftware.lib.dto.geda.annotations.Dto;
import com.inspiresoftware.lib.dto.geda.annotations.DtoField;
import com.tmpt.beans.GoodsCategoryLink;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter
@Setter
@Dto("com.tmpt.beans.GoodsInfo")
public class GoodsInfoDto implements Serializable{
	private static final long serialVersionUID = 1L;

	@DtoField
	private int id;

	@DtoField
	private String goodsName;

	@DtoField
	private String goodsKeys;

	@DtoField
	private String goodsPt;

	@DtoField
	private String goodsCode;

	@DtoField
	private String specifications;

	@DtoField
	private BigDecimal weight;

	@DtoField
	private BigDecimal totalWeight;

	@DtoField
	private BigDecimal goodsPrice;

	@DtoField
	private String goodsStatus;

	@DtoField
	private String goodsDescript;

	//不使用该字段关联商品分类，通过t_goods_category_link表进行关联
	@DtoField
	private Integer goodsTypeId;

	@DtoField
	private Integer mchntId;

	@DtoField
	private Date validDate;

	@DtoField
	private Integer pricePer;

	@DtoField
	private String barCode;

	@DtoField
	private String goodsCheck;

	@DtoField
	private String goodsCheckAdmin;

	@DtoField
	private String unit;

	@DtoField
	private List<GoodsCategoryLink> goodsCategoryLinks = new ArrayList<GoodsCategoryLink>();

	@Override
	public boolean equals(Object obj) {
		GoodsInfoDto p = (GoodsInfoDto)obj;
		if((p.getId()==this.id)){
			return true;
		}else{
			return false;
		}
	}
}
